#ifndef CS488_RAY_HPP
#define CS488_RAY_HPP

#include "algebra.hpp"
//#include "material.hpp"
//#include "scene.hpp"

class GeometryNode;
class Material;
class Texture;
class Bump;

struct Ray {
	Ray( const Point3D& pos, const Vector3D& dir ): m_dir(dir), m_pos(pos){}
	Vector3D get_direction(){ return m_dir; }
	Point3D get_position(){ return m_pos; }
	void set_direction(const Vector3D& dir){ m_dir = dir; }
	void set_position(const Point3D& pos){ m_pos = pos; }
	
private:
	Vector3D m_dir;
	Point3D m_pos;
};

struct Intersection {
	Intersection():m_dist(1000000.0), m_inside(false){}
	Point3D m_intersect;
	Vector3D m_normal;
	Vector3D m_normal2;
	Material *m_material;
	Texture *m_texture;
	Bump *m_bump;
	GeometryNode *m_hit_node;
	double m_dist;
	double m_dist2;
	bool m_inside;
	double u;
	double v;
};

#endif
